#include <iostream>
#include "functions.h"

using namespace std;

int main() 
{
	string buffer = "";
	bool exit_flag = false;
	int choice;
	address_book_init();
	while (1)
	{
			cout << "Enter choice: ";
			cin >> choice;
			switch (choice)
			{
			case 1:
				add_contact();
				break;
			case 2:
				search_contact();
				break;
			case 3:
				delete_contact();
				break;
			case 4:
				update_contact();
				break;
			case 5:
				display_all_contacts();
				break;
			case 6:
				delete_all_contacts();
				break;
			case 7:
				edit_contact();
				exit_flag = true;
				break;

			default:
				cout << "Invalid choice. Please try again." << endl;
				break;
			}
			if(exit_flag == true)
			{
				break;
			}
			cout << "Press any key to continue..." << endl;
			cin >> buffer;
			print_screen();

	}
	

system("pause");
return 0;
}